package com.springboot.prac.prac01_proxy.config;

import com.springboot.prac.prac01_proxy.beans.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Random;

@Configuration
public class AppConfig {
    @Bean(name = "user")
    public User initUser() {
        User user = new User();
        user.setUserId(new Random().nextInt(10)+"");
        user.setName("syl");
        return user;
    }
}
